package com.itheima;

import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;

import javax.sql.DataSource;

public class Generator {

    public static void main(String[] args) {
        AutoGenerator autoGenerator = new AutoGenerator();
        DataSourceConfig daSource = new DataSourceConfig();
        daSource.setDriverName("com.mysql.cj.jdbc.Driver");
        daSource.setUrl("jdbc:mysql:///mybatisplus_db?useSSL=false");
        daSource.setUsername("root");
        daSource.setPassword("fb2002110fb");
        autoGenerator.setDataSource(daSource);
        autoGenerator.execute();

    }
}
